package com.yaodian100.ec.timelimitsale.service;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;

import com.yaodian100.core.common.dao.impl.CommonCriteria;
import com.yaodian100.core.common.exception.CoreException;
import com.yaodian100.core.common.service.DomainService;
import com.yaodian100.ec.generate.entity.EventImage;
import com.yaodian100.ec.product.entity.Product;
import com.yaodian100.ec.shelf.entity.Shelf;
import com.yaodian100.ec.shelf.entity.ShelfTuangou;
import com.yaodian100.ec.shopping.entity.CartOrderProduct;
import com.yaodian100.ec.timelimitsale.entity.TimeLimitMain;
import com.yaodian100.ec.timelimitsale.entity.TimeLimitProd;

public interface TimeLimitSaleService extends DomainService<TimeLimitMain> {

	public static String NONMEMBER = "0";
	public static String EVER_BUY = "1";
	public static String OK = "2";
	public static String MULTIPLE_PROD = "3";

	public boolean isTimeLimitSale(String productId);

	public String canBuy(List<CartOrderProduct> cartOrderProduct, String memberId);

	public String canBuy(String productId, String memberId);

	public List<String> findTimeLimitSale(List<CartOrderProduct> cartOrderProduct);

	public EventImage saveEventImage(EventImage eventImage) throws CoreException;

	public TimeLimitProd saveOrUpdateTimeLimitProd(TimeLimitProd entity);

	public TimeLimitProd getTimeLimitProd(String id);

	public List<TimeLimitProd> getTimeLimitProdList(CommonCriteria criteria);

	public boolean updateData(String date) throws ParseException, CoreException, IOException;

	public String canAdd(String productId, String memberId, List<CartOrderProduct> cartOrderProducts);

	public boolean generateTimeLimitSaleList(String date, int categoryId) throws ParseException, CoreException,
			IOException;

	public boolean saveTimeLimitSale(TimeLimitMain tlm, List<TimeLimitProd> tlpList);

	public Number getTimeLimitProdListSize(CommonCriteria criteria);

	public List<TimeLimitProd> getTimeLimitProdList(CommonCriteria criteria, String[] sortOrder, int startNode,
			int returnSize);

	public boolean sendTimeLimitSaleStatusList(String date, int categoryId) throws ParseException;

	public List<Object> getProductList();

	public boolean generateMTimeLimitSaleList(String date) throws CoreException, IOException, ParseException;

	public void addTimeLimitProd(Product product, Shelf shelf);

	public void addTuangouTimeLimitProd(Product product,ShelfTuangou shelfTuangou);
}
